﻿/*****************************************************************//**
 * @file   VAOneXMLAdaptorPhysicalPropertyUniform.h
 * @brief  VAOne读写适配器均质板
 *
 * @author liuzhiyuan(liuzhiyuan@diso.cn)
 * @date   2024-11-05
 *********************************************************************/
#ifndef VAONEXMLADAPTORPHYSICALPROPERTYUNIFORM_H
#define VAONEXMLADAPTORPHYSICALPROPERTYUNIFORM_H

#include "FITKVAOneXMLIOAPI.h"
#include "FITKAbstractVAOneXMLAdaptor.h"
#include "FITK_Kernel/FITKCore/FITKCoreMacros.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"

namespace IO
{
    /**
     * @brief   VAOne读写适配器均质板
     * @author  liuzhiyuan(liuzhiyuan@diso.cn)
     * @date    2024-11-05
     */
    class FITKVAOneXMLIOAPI VAOneXMLAdaptorPhysicalPropertyUniform : public FITKAbstractVAOneXMLAdaptor
    {
        FITKCLASS(IO, VAOneXMLAdaptorPhysicalPropertyUniform);
    public:

        /**
         * @brief   构造函数
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        explicit VAOneXMLAdaptorPhysicalPropertyUniform()= default;
        /**
         * @brief   析构函数
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        ~VAOneXMLAdaptorPhysicalPropertyUniform() = default;
        /**
         * @brief   适配器读数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        bool adaptR() override;
        /**
         * @brief   适配器写数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        bool adaptW() override;

    private:
        /**
         * @brief   读取均质板数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        bool readUniform();
        /**
         * @brief   写均质板数据
         * @return  是否执行成功
         * @author  liuzhiyuan(liuzhiyuan@diso.cn)
         * @date    2024-11-05
         */
        bool writeUniform();
    };
    Register2FITKIOAdaptorFactory(VAOneXML, Acoustics::FITKPhyscisPropertyUniform, VAOneXMLAdaptorPhysicalPropertyUniform)
}
#endif // VAONEXMLADAPTORPHYSICALPROPERTYUNIFORM_H
